# $Id$
# Maintainer: Pierre Schmitz <pierre@archlinux.de>
# Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>

pkgname=lynx
pkgver=2.8.9
_relver=${pkgver}rel.1
pkgrel=2
pkgdesc="A text browser for the World Wide Web"
url="https://lynx.browser.org/"
arch=('x86_64')
license=('GPL')
depends=('openssl' 'libidn')
backup=('etc/lynx.cfg')
source=(https://invisible-mirror.net/archives/lynx/tarballs/${pkgname}${_relver}.tar.bz2{,.asc})
sha256sums=('387f193d7792f9cfada14c60b0e5c0bff18f227d9257a39483e14fa1aaf79595'
            'SKIP')
validpgpkeys=('C52048C0C0748FEE227D47A2702353E0F7E48EDB')
  
build() {
  cd ${srcdir}/${pkgname}${_relver}
  ./configure --prefix=/usr \
    --sysconfdir=/etc \
    --with-ssl=/usr \
    --enable-nls \
    --enable-ipv6 \
    --mandir=/usr/share/man
  make
}

package() {
  cd ${srcdir}/${pkgname}${_relver}
  make DESTDIR=${pkgdir} install

  # FS#20404 - points to local help
  sed -i -e "s|^HELPFILE.*$|HELPFILE:file:///usr/share/doc/lynx/lynx_help/lynx_help_main.html|" ${pkgdir}/etc/lynx.cfg

  install -d ${pkgdir}/usr/share/doc/lynx
  cp -rf lynx_help ${pkgdir}/usr/share/doc/lynx
}
